<template>
  <div>
    <button>向前</button>
    {{name}}------>{{msg}}
    <button @click="headClick">向后</button>

  </div>

</template>

<script>
export default {
  name: "Child",
  data() {
    return {name: "我是你祖师爷"}
  },
  methods: {
    headClick() {
      alert(this.name)
    }

  },
  props: {
    msg: {
      type: String,
      required: true,
      default: "呵呵"
    }
    // props:["msg"]
  }
}
</script>



<style scoped>

</style>